1. Field of the Invention
The present invention generally relates to PWM (pulse width modulation) apparatuses that output a pulse signal based on pulse width modulation, and particularly relates to a PWM apparatus that modifies a pulse waveform at a predetermined timing.
2. Description of the Related Art
A PWM (pulse width modulation) apparatus outputs a pulse signal having a specified cycle and a specified duty ratio. The pulse signal output from the PWM apparatus may be used to control motor revolution for the purpose of attending to auto-focus control of a camera apparatus or the like. In general, a CPU accesses the PWM apparatus to change the cycle and duty ratio, thereby controlling the waveform of the output pulse signal.
When there is a need to modify the waveform of a pulse signal in response to an external event such as a trigger from a timer, the timer generates an interruption to the CPU. In response, the CPU executes an interruption routine, and updates data of the PWM waveform stored in the PWM apparatus by using a bus as an access route. When the data of PWM waveform is updated via the bus, the waveform of a pulse signal output from the PWM apparatus changes accordingly.
When the CPU is attending to other processes having higher priority or other interruption processes, response to the interruption from the timer or the like is delayed, resulting in undesirable fluctuation in the timing at which the data of PWM waveform is updated.
Accordingly, there is a need for a PWM apparatus which can change the PWM waveform at a desired timing.